import React from 'react';
import { Route, Redirect,Switch } from "react-router-dom";
import Home from './Pages/Home';
import Join from './Pages/Join';
import List from './Pages/List';
import Login from './Pages/Login';
import Main from './Pages/Main';
/* import Main1 from './Pages/Main1'; */

function App() {
  return (
    <>
      <Route path='/login' component={Login} />
      <Route path='/admin'>
        <Main>
          <Switch>
            <Route path='/admin/home'  component={Home} />
            <Route path='/admin/list' component={List} />
            <Route path='/admin/join' component={Join} />
          </Switch>
        </Main>

      </Route>
      <Redirect to='/login' from='/' />
    </>
  );
}

export default App;
